import request from '@/utils/request'

// 查询聊天话题分类列表
export function listTopics(query) {
  return request({
    url: '/system/topics/list',
    method: 'get',
    params: query
  })
}

// 查询聊天话题分类详细
export function getTopics(topicId) {
  return request({
    url: '/system/topics/' + topicId,
    method: 'get'
  })
}

// 新增聊天话题分类
export function addTopics(data) {
  return request({
    url: '/system/topics',
    method: 'post',
    data: data
  })
}

// 修改聊天话题分类
export function updateTopics(data) {
  return request({
    url: '/system/topics',
    method: 'put',
    data: data
  })
}

// 删除聊天话题分类
export function delTopics(topicId) {
  return request({
    url: '/system/topics/' + topicId,
    method: 'delete'
  })
}
